/**
 * 添加比赛模型
 *
 */

module.exports = class extends think.Model
{
    async addCPData(cpData){
       return await this.model('competition').add(cpData);
    }

    async addSteps(stepsData){
        return await this.model('competitionsteps').addMany(stepsData);
    }

    async addAwardsItems(awardsItemData){
        return await this.model('stepsaward').addMany(awardsItemData);
    }
    async addJudger(judgerData){
        return await this.model('competitionstepstojudger').addMany(judgerData);
    }
    async addCPDataSql(cpData){
       return await this.model('competition').buildSql(cpData);
    }

    async addStepsSql(stepsData){
        return await this.model('competitionsteps').addMany(stepsData);
    }

    async addAwardsItemsSql(awardsItemData){
        return await this.model('stepsaward').addMany(awardsItemData);
    }
    async addJudgerSql(judgerData){
        return await this.model('competitionstepstojudger').addMany(judgerData);
    }

}
